package com.auto.sns.core.service.impl;

import java.util.List;
import java.util.Map;

import com.auto.oa.user.domain.OaUserInfoExtend;
import com.auto.oa.user.service.OaUserServiceFactory;
import com.auto.sns.core.dao.SnsCoreDAOFactory;
import com.auto.sns.core.domain.SnsCoreUserRelaMapExtend;
import com.auto.sns.core.service.ISnsCoreUserService;
import com.system.common.Page;
import com.system.util.BeanUtil;

public class SnsCoreUserServiceImpl implements ISnsCoreUserService {

	public boolean updateUserInfo() throws Exception {
		boolean bool = true;
		try {
			
			return bool;
		} catch (Exception e) {
			e.printStackTrace();
			throw e;
		}
	}

	public List<OaUserInfoExtend> queryPageListUserInfoByOrgCode(String orgCode, Page page) throws Exception {
		try {
			OaUserInfoExtend oaUserInfoExtend = new OaUserInfoExtend();
			oaUserInfoExtend.setAuorgCode(orgCode);
			
			List<OaUserInfoExtend> resultList = OaUserServiceFactory.oaUserInfoService.queryPageListUserOrg(oaUserInfoExtend, page);
			
			return resultList;
		} catch (Exception e) {
			e.printStackTrace();
			throw e;
		}
	}

	public List<SnsCoreUserRelaMapExtend> queryPageListMyCareUser(SnsCoreUserRelaMapExtend snsCoreUserRelaMapExtend, Page page) throws Exception {
		try {
			Map<String, Object> param = BeanUtil.convertBeanToMap(snsCoreUserRelaMapExtend);
			List<SnsCoreUserRelaMapExtend> resultList = SnsCoreDAOFactory.snsCoreUserRelaMapDAO.querySnsCoreUserRelaMapExtendList(param, page);
			
			return resultList;
		} catch (Exception e) {
			e.printStackTrace();
			throw e;
		}
	}

}
